import { http } from "@/utils/http";
import { baseUrlApi } from "@/api/utils";
/**
 * @description: 获取商户用户列表
 */
export function getPageList(params) {
  return http.request("get", baseUrlApi("business/merchant_manager_user/listMerchant"), { params });
}
//  添加系统用户
export const addBackstage = (params: any) => {
  return http.request("post", baseUrlApi("business/merchant_manager_user/addBackstage"), {
    data: params
  });
};
// 删除系统用户
export const deleteData = (id: number) => {
  return http.request("delete", baseUrlApi(`business/merchant_manager_user/removeMerchant/${id}`));
}; 
// 添加商户用户
export const addMerchant = (params: any) => {
  return http.request("post", baseUrlApi("business/merchant_manager_user/addMerchant"), {
    data: params
  });
};
// 税务端用户列表
export function listTax(params) {
  return http.request("get", baseUrlApi("business/merchant_manager_user/listTax"), { params });
}
// 添加税务用户
export const addTax = (params: any) => {
  return http.request("post", baseUrlApi("business/merchant_manager_user/addTax"), {
    data: params
  });
};
// 删除税务用户
export const removeTax = (id: number) => {
  return http.request("delete", baseUrlApi(`business/merchant_manager_user/removeTax/${id}`));
}; 
// 修改税务用户 
export const editTax = (params: any) => {
  return http.request("post", baseUrlApi("business/merchant_manager_user/editTax"), {
    data: params
  });
};
// 代理用户列表 代理 
export function listDeptAgentAll() {
  return http.request("get", baseUrlApi("business/user_data_permissions/listDeptAgentAll"));
}
// 代理用户列表
export function listAgent(params: any) {
  return http.request("get", baseUrlApi("business/merchant_manager_user/listAgent"), { params });
}
// 删除代理用户
export const removeAgent = (id: number) => {
  return http.request("delete", baseUrlApi(`business/merchant_manager_user/removeAgent/${id}`));
};
// 添加代理用户
export const addAgent = (params: any) => {
  return http.request("post", baseUrlApi("business/merchant_manager_user/addAgent"), {
    data: params
  });
};
// 修改代理用户
export const editAgent = (params: any) => {
  return http.request("post", baseUrlApi("business/merchant_manager_user/editAgent"), {
    data: params
  });
};
// 公告列表 
export function noticeList(params: any) {
  return http.request("get", baseUrlApi("business/notice/list"), { params });
}
// 删除公告
export const removeNotice = (id: number) => {
  return http.request("delete", baseUrlApi(`business/notice/remove/${id}`));
};
// 添加公告 
export const addNotice = (params: any) => {
  return http.request("post", baseUrlApi("business/notice/add"), {
    data: params
  });
};
// 公告推送对象 ?merchantsState=1
export function listMerchantName(params?: any) {
  return http.request("get", baseUrlApi("business/user_data_permissions/listMerchantName"), { params });
}
// 公告详情
export const getInfoNotice = (id: number) => {
  return http.request("get", baseUrlApi(`business/notice/getInfo/${id}`));
};
// 编辑公告
export const editNotice = (params: any) => {
  return http.request("put", baseUrlApi("business/notice/edit"), {
    data: params
  });
};
// 官网资讯 列表 
export function newsList(params: any) {
  return http.request("get", baseUrlApi("business/news/list"), { params });
}
// 删除官网资讯
export const removeNews = (id: number) => {
  return http.request("delete", baseUrlApi(`business/news/remove/${id}`));
};
// 新增官网资讯
export const addNews = (params: any) => {
  return http.request("post", baseUrlApi("business/news/add"), {
    data: params
  });
};
// 官网资讯 详情
export const getInfoNews = (id: number) => {
  return http.request("get", baseUrlApi(`business/news/getInfo/${id}`));
};
// 编辑官网资讯
export const editNews = (params: any) => {
  return http.request("put", baseUrlApi("business/news/edit"), {
    data: params
  });
};
// 反馈与建议列表 
export function feedbackList(params: any) {
  return http.request("get", baseUrlApi("business/merchants_info_feed_back/list"), { params });
}
// 处理反馈建议 
export const feedbackState = (params: any) => {
  return http.request("put", baseUrlApi("business/merchants_info_feed_back/state"), {
    data: params
  });
};
// 支付验证设置详情 
export function systemInfo(params?: any) {
  return http.request("get", baseUrlApi("system/config/getInfo"), { params });
}